package com.xuecheng.ucenter.feignclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName: CheckCodeClient
 * @Description:
 * @Author: Huang Yao
 * @CreateTime: 2024-07-17 19:39
 * @Version: 1.0
 **/
@FeignClient(value = "checkcode",fallbackFactory = CheckCodeClientFactory.class)
@RequestMapping("/checkcode")
public interface CheckCodeClient {

    /**
     * 验证码校验
     * @param key 存在redis中的验证码key
     * @param code 验证码
     * @return
     */
    @PostMapping(value = "/verify")
    public Boolean verify(@RequestParam("key") String key, @RequestParam("code") String code);
}
